<?php //debug($nivel);  ?>
<div class="formSep">
    <h3 class="heading">Asignar Materias al nivel</h3>
    <h3><?php echo $nivel['Nivele']['nombre']; ?></h3> 
    <div class="row-fluid">
        <div class="span6">			
            <p>
                <span class="label label-inverse">
                    Seleccione las Materias
                </span>
            </p>

            <?php echo $this->Form->create('Niveles', array('id' => 'searchable-form')); ?>				
            <select name="materias[]" multiple="multiple" id="searchable-select">
                <option value="">
                </option>					
                <?php foreach ($materias as $m): ?>
                    <option value="<?php echo $m['Materia']['id']; ?>">
                        <?php echo $m['Materia']['nombre']; ?>
                    </option>    
                <?php endforeach; ?>
            </select>
        </div>
    </div>
    <div class="form-actions">
        <button class="btn btn-success" type="submit">
            Guardar Materias
        </button>
    </div>
</form>
</div>
<!-- sidebar -->
<?php echo $this->
        element('menumaterias');
?>
<!-- fin sidebar -->
<?php //llamamos scripts tablas ?>
<?php echo $this->
        element('jsformularios');
?>